package com.ruoyi.shop.service.impl;

import java.util.List;

import com.ruoyi.shop.api.domain.CheShopImage;
import com.ruoyi.shop.domain.pojo.AddListImage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.shop.mapper.CheShopImageMapper;
import com.ruoyi.shop.service.ICheShopImageService;

/**
 * 门店照片Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-03
 */
@Service
public class CheShopImageServiceImpl implements ICheShopImageService 
{
    @Autowired
    private CheShopImageMapper cheShopImageMapper;

    /**
     * 查询门店照片
     * 
     * @param shopImageId 门店照片主键
     * @return 门店照片
     */
    @Override
    public CheShopImage selectCheShopImageByShopImageId(Long shopImageId)
    {
        return cheShopImageMapper.selectCheShopImageByShopImageId(shopImageId);
    }

    /**
     * 查询门店照片列表
     * 
     * @param cheShopImage 门店照片
     * @return 门店照片
     */
    @Override
    public List<CheShopImage> selectCheShopImageList(CheShopImage cheShopImage)
    {
        return cheShopImageMapper.selectCheShopImageList(cheShopImage);
    }

    /**
     * 新增门店照片
     * 
     * @param cheShopImage 门店照片
     * @return 结果
     */
    @Override
    public int insertCheShopImage(CheShopImage cheShopImage)
    {
        return cheShopImageMapper.insertCheShopImage(cheShopImage);
    }

    /**
     * 修改门店照片
     * 
     * @param cheShopImage 门店照片
     * @return 结果
     */
    @Override
    public int updateCheShopImage(CheShopImage cheShopImage)
    {
        return cheShopImageMapper.updateCheShopImage(cheShopImage);
    }

    /**
     * 批量删除门店照片
     * 
     * @param shopImageIds 需要删除的门店照片主键
     * @return 结果
     */
    @Override
    public int deleteCheShopImageByShopImageIds(Long[] shopImageIds)
    {
        return cheShopImageMapper.deleteCheShopImageByShopImageIds(shopImageIds);
    }

    /**
     * 删除门店照片信息
     * 
     * @param shopImageId 门店照片主键
     * @return 结果
     */
    @Override
    public int deleteCheShopImageByShopImageId(Long shopImageId)
    {
        return cheShopImageMapper.deleteCheShopImageByShopImageId(shopImageId);
    }

//    批量插入
    @Override
    public int insertCheShopImages(AddListImage cheShopImages)
    {

         return  cheShopImageMapper.insertCheShopImages(cheShopImages);
    }
}
